import java.util.*;

/**
 * @author: gao
 * @create-date: 2025/5/28 22:29
 */

public class Main {
    public static void main(String[] args) {
        double s = 0;
        Scanner sc = new Scanner(System.in);
        double r1, r2;
        r1 = sc.nextDouble();
        r2 = sc.nextDouble();
        Circle c1 = new Circle(r1);
        Circle c2 = new Circle(r2);
        try {
            s = c1.area();
            System.out.println(s);
            s = c2.area();
            System.out.println(s);
        } catch (CircleException e) {
            e.print();
        }
    }
}

class CircleException extends Exception {
    public CircleException(String message) {
        super(message);
    }

    public void print() {
        System.out.println(getMessage());
    }
}

class Circle {
    public double radius;
    public static final double PI = 3.14;

    public Circle(double radius) {
        this.radius = radius;
    }

    public double area() throws CircleException {
        if (radius < 0) {
            throw new CircleException("The radius " + radius + " is invalid.");
        }
        return PI * radius * radius;
    }
}